﻿using System;

using VFramework;

namespace VFramework
{
	/// <summary>
	/// 程序辅助
	/// </summary>
	public class AppHelper
	{
		private AppHelper () { }

		/// <summary>
		/// 加载场景
		/// </summary>
		/// <returns></returns>
		/// <param name="name">场景的名字</param>
		/// <param name="asyn">是否异步,若为异步，则先进入load场景，然后由load场景异步加载之</param>
		public static void loadScene (string name, bool asyn = false)
		{
			EventMgr.getInstance ().dispatchEvent (FrameEvents.LOAD_SCENE_BY_NAME, ArgsWarp.newWarp ()
												   .put ("asyn", asyn).put ("name", name).toDic ());
		}
	}
}

